<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script src="../axios.js"></script>
  <script>
    axios.defaults.baseURL = 'http://127.0.0.1'
    axios.interceptors.request.use(function (config) {
      config.headers.mytoken = 'acvgadas'
      return config
    }, function (error) {
      return Promise.reject(error)
    })

    axios.interceptors.response.use((response) => {
      console.log(response);
      data = response.data
      return data
    }, (error) => {
      return Promise.reject(error)
    })
  </script>
</body>

</html>